package com.ebelter.ty.ui.activity;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;

import com.ebelter.btcomlib.bases.activity.BaseActivity;
import com.ebelter.btcomlib.bases.fragment.FragmentUtil;
import com.ebelter.btcomlib.utils.StatusBarUtil;
import com.ebelter.btcomlib.utils.StatusbarColorUtils;


public abstract class TyBaseActivity extends BaseActivity {
    @Override
    protected void initView() {
        StatusBarUtil.setDarkStatusIcon(this,false);
        StatusbarColorUtils.setStatusBarDarkIcon(this,false);
    }


    protected void replaceFragment(Fragment fragment,int containid){
        FragmentUtil.replaceFragment(getSupportFragmentManager(),containid,fragment);
    }

    //隐藏Fragment
    protected void hideAllFragment(FragmentTransaction transaction, Fragment... fragments) {
        if (transaction == null || fragments == null || fragments.length == 0) {
            return;
        }
        for (Fragment fragment : fragments) {
            if (fragment != null) transaction.hide(fragment);
        }
    }



}
